from django.test import TestCase
from .models import *
import random


# 测试数据

# 分类表
# list1 = [
#     ("素食主义","吃素好啊，吃素健康啊，我最苗条"),
#     ("无肉不欢","吃肉啊，没有肉的日子让我怎么办"),
#     ("海鲜盛宴","我要的海洋，就喜欢吃螃蟹。。。。"),
#     ("特调饮品","就喜欢鲜榨果汁，没毛病！！！！")
# ]
#
#
# index = 0
# for i,j in list1:
#     index += 1
#     classify = DishClassify()
#     classify.classify = i
#     classify.classify_desc = j
#     classify.classify_img = "images/pic" + str(index) + ".jpg"
#     classify.save()
#
#
# # # 素食主义测试菜品
# list2 = [
#     "胡萝卜沙拉",
#     "桂花甜藕",
#     "清爽藕片",
#     "脆口黄瓜片",
#     "老豆干",
#     "姜汁嫩藕",
#     "山药紫薯泥",
#     "清爽萝卜丝",
#     "木瓜银耳",
#     "盘龙黄瓜",
#     "火爆杏鲍菇",
#     "坚果拼盘",
#     "脆三丝",
#     "莴苣遇上蘑菇",
#     "三彩脆蔬",
#     "干煸豆角",
#     "青瓜嫩笋",
#     "肉沫茄子",
# ]
#
#
#
#
# for index,d in enumerate(list2):
#     dish = Dishes()
#     dish.dish_name = d
#     dish.dish_type_id = 1
#     dish.dish_price = random.randint(30, 150)
#     dish.dish_img = "images/greens/1-" + str(index+1) + ".jpg"
#     dish.dish_short = "这里是菜品简介"
#     dish.dish_desc = "这是一个非常好吃的菜，这里是详细介绍"
#     dish.save()
#
# list3 = [
#     "苏州白肉",
#     "香嫩卤肉块",
#     "上汤排骨",
#     "香辣毛肚",
#     "原味猪头肉",
#     "钵钵鸡",
#     "红烧鸡翅",
#     "香卤蹄筋",
#     "丸子烩菜",
#     "酸辣鸡丁",
#     "私房回锅肉",
#     "不一样的毛血旺",
#     "黑椒牛柳",
#     "粉蒸鸡块",
#     "水煮牛肉",
#     "水煮牛蛙",
#     "三色脆骨",
#     "皇家小炒肉",
# ]
#
# for index,d in enumerate(list3):
#     dish = Dishes()
#     dish.dish_name = d
#     dish.dish_type_id = 2
#     dish.dish_price = random.randint(50, 150)
#     dish.dish_img = "images/meat/2-" + str(index+1) + ".jpg"
#     dish.dish_short = "这里是菜品简介"
#     dish.dish_desc = "这是一个非常好吃的菜，这里是详细介绍"
#     dish.save()
#
# list4 = [
#     "小米炖辽参",
#     "三彩鲈鱼",
#     "鲍汁鱼花",
#     "红烧黄鳝",
#     "泉水鲍鱼",
#     "红烧肉炖海参",
#     "浓香鲍鱼",
#     "皇家鱼翅",
#     "番茄鱼片",
#     "西兰花烧鱿鱼",
#     "葱爆大虾",
#     "虾仁跑蛋",
#     "澳洲大龙虾",
#     "原味海鲜锅",
#     "螃蟹遇上年糕",
#     "火爆墨鱼仔",
#     "清蒸鲍鱼",
#     "螃蟹一家亲",
#     "蒜蓉粉丝蒸扇贝",
#     "青口贝",
#     "海鲜浓汤",
#     "澳洲小龙虾",
#     "茴香和大虾",
#     "钵钵海鲜",
#     "虾兵蟹将",
#     "葱爆蚬子",
#     "鱼情未了",
# ]
#
# for index,d in enumerate(list4):
#     dish = Dishes()
#     dish.dish_name = d
#     dish.dish_type_id = 3
#     dish.dish_price = random.randint(100, 300)
#     dish.dish_img = "images/seafood/3-" + str(index+1) + ".jpg"
#     dish.dish_short = "这里是菜品简介"
#     dish.dish_desc = "这是一个非常好吃的菜，这里是详细介绍"
#     dish.save()
#
#
#
# list5=[
#     "伯爵红茶",
#     "天生一对气泡果饮",
#     "草莓奶昔",
#     "地中海",
#     "柠檬柚子茶",
#     "不一样的可乐",
#     "猕猴桃汁",
#     "夏日冰沙",
#     "七喜玫瑰气泡水",
#     "一个凤梨",
#     "牛奶草莓",
#     "椰奶",
#     "芒果很忙",
#     "冰红茶",
#     "乌龙茶",
#     "玫瑰红糖",
#     "樱花果饮",
#     "胡萝卜汁",
#     "冬季恋歌",
#     "六个橙子",
# ]
# #
# for index,d in enumerate(list5):
#     dish = Dishes()
#     dish.dish_name = d
#     dish.dish_type_id = 4
#     dish.dish_price = random.randint(10, 30)
#     dish.dish_img = "images/juice/4-" + str(index+1) + ".jpg"
#     dish.dish_short = "这里是饮品简介"
#     dish.dish_desc = "这是一个味道非常好的饮品，这里是详细介绍"
#     dish.save()

# for dish in Dishes.objects.all():
#     dish.dish_img = dish.dish_img.split("")




